package com.surfmanager.model;
// Generated Aug 10, 2014 1:22:13 PM by Hibernate Tools 3.6.0


import com.google.gson.annotations.Expose;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;

@Entity
@Table(name="surfsession")
public class SurfSession  implements java.io.Serializable, Comparable {


    @Id
    @Column(name="session_id")
    @GeneratedValue	
     private Integer sessionId;
    
    @Column(name="departDate")
    @Temporal(javax.persistence.TemporalType.DATE)
    @Expose(serialize = false)
     private Date departDate;
    
    @Column(name="retourDate")
    @Temporal(javax.persistence.TemporalType.DATE)
    @Expose(serialize = false)
     private Date retourDate;
    
    @Column(name="departPlace")
     private String departPlace;
    
    @Column(name="sessionPlace")
     private String sessionPlace;
    
    @Column(name="sessionDuration")
     private String sessionDuration;
    
    @Column(name="sessionProbability")
    private double sessionProbability;
     
    @Column(name="maxParticipants")
    private int maxParticipants;
    
       @Column(name="pricePerParticipant")
     private double pricePerParticipant;
     
     @Column(name="transport")
     private String transport;
     
     @Column(name="description")
     private String description;
     
     @ManyToOne
    @JoinColumn(name="profile_id")
    private Profile profile;

    public SurfSession() {
    }

    public SurfSession(Date departDate, Date retourDate, String departPlace, String sessionPlace, String sessionDuration, double sessionProbability, int maxParticipants, double pricePerParticipant, String transport, String description) {
       this.departDate = departDate;
       this.retourDate = retourDate;
       this.departPlace = departPlace;
       this.sessionPlace = sessionPlace;
       this.sessionDuration = sessionDuration;
       this.sessionProbability = sessionProbability;
       this.maxParticipants = maxParticipants;
       this.pricePerParticipant = pricePerParticipant;
       this.transport = transport;
       this.description = description;
       }
   
    public Integer getSessionId() {
        return this.sessionId;
    }
    
    public void setSessionId(Integer sessionId) {
        this.sessionId = sessionId;
    }
    public Date getDepartDate() {
        return this.departDate;
    }
    
    public void setDepartDate(Date departDate) {
        this.departDate = departDate;
    }
    public Date getRetourDate() {
        return this.retourDate;
    }
    
    public void setRetourDate(Date retourDate) {
        this.retourDate = retourDate;
    }
    public String getDepartPlace() {
        return this.departPlace;
    }
    
    public void setDepartPlace(String departPlace) {
        this.departPlace = departPlace;
    }
    public String getSessionPlace() {
        return this.sessionPlace;
    }
    
    public void setSessionPlace(String sessionPlace) {
        this.sessionPlace = sessionPlace;
    }
    public String getSessionDuration() {
        return this.sessionDuration;
    }
    
    public void setSessionDuration(String sessionDuration) {
        this.sessionDuration = sessionDuration;
    }
    public double getSessionProbability() {
        return this.sessionProbability;
    }
    
    public void setSessionProbability(double sessionProbability) {
        this.sessionProbability = sessionProbability;
    }
    public int getMaxParticipants() {
        return this.maxParticipants;
    }
    
    public void setMaxParticipants(int maxParticipants) {
        this.maxParticipants = maxParticipants;
    }
    public double getPricePerParticipant() {
        return this.pricePerParticipant;
    }
    
    public void setPricePerParticipant(double pricePerParticipant) {
        this.pricePerParticipant = pricePerParticipant;
    }
    public String getTransport() {
        return this.transport;
    }
    
    public void setTransport(String transport) {
        this.transport = transport;
    }
    public String getDescription() {
        return this.description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }

    public Profile getProfile() {
        return profile;
    }

    public void setProfile(Profile profile) {
        this.profile = profile;
    }

    @Override
    public String toString() {
        return "Session{" + "sessionId=" + sessionId + ", departDate=" + departDate + ", retourDate=" + retourDate + ", departPlace=" + departPlace + ", sessionPlace=" + sessionPlace + ", sessionDuration=" + sessionDuration + ", sessionProbability=" + sessionProbability + ", maxParticipants=" + maxParticipants + ", pricePerParticipant=" + pricePerParticipant + ", transport=" + transport + ", description=" + description + ", profile=" + '}';
    }

    @Override
    public int compareTo(Object o) {
       return this.getSessionId().compareTo(((SurfSession)o).getSessionId());
    }
  
    



}


